<!DOCTYPE html>
<html>
<head>
	<title>意见反馈记录</title>
	{{>/WEB-INF/pages/common/meta_base.part.html}}
	{{>/WEB-INF/pages/common/refs_base.part.html}}
	{{>/WEB-INF/pages/common/refs_modal.part.html}}
	<script type="text/javascript">
		var ctx = '{{ctx}}';
	</script>
	<script src="{{ctx}}/static/bsl/js/parseEnum.js" type="text/javascript"></script>
	<script src="{{ctx}}/static/bsl/js/comment/comment.js" type="text/javascript"></script>

</head>
<body>
{{>/WEB-INF/pages/common/layout_header.part.html}}
<div class="container">
	<ul class="breadcrumb">
	  <li><a href="{{ctx}}">首页</a></li>
	  <li><a href="{{ctx}}/system/cloud">云服务</a></li>
	  <li class="active">应用意见</li>
	</ul>
	<hr class="hr1">
	<div class="hr-10"></div>
	<div class="hr-10"></div>
	<div class="hr-10"></div>
	{{#message}}
		<script type="text/javascript">
			bootbox.alert('<h4>{{message}}</h4>');
		</script>
	{{/message}}
	<div style="margin:5px 20px 10px">
<form id="search-form" class="form-inline" role="form" action="{{queryPath}}" method="get">
	<div class="form-group">
		<label class="sr-only">处理状态</label>
		<select name="q_EQ_status" style="min-width:120px">
			{{#status}}
			<option value="{{key}}" {{#selected}}selected{{/selected}}>{{value}}</option>
			{{/status}}
		</select>
	</div>
	<div class="form-group">
		<label class="sr-only" for="so_queryValue">查找内容</label>
		<div class="input-group" style="width:300px">
    		<input type="text" id="so_queryValue" name="queryValue" value="{{queryValue}}" class="form-control"/>
			<input type="hidden" id="so_dynamicFilter"/>
    		<span class="input-group-btn">
				<button id="so_go" class="btn btn-default" type="button"><span class="glyphicon glyphicon-search"></span>查找</button>
			</span>
		</div>
	</div>
	<div class="form-group">
		<label class="sr-only">排序</label>
		<div class="btn-group">
		{{#sortInfo}}
		  <button type="button" class="btn btn-info btn-default dropdown-toggle" data-toggle="dropdown">
		    排序：{{currentSortEntry.text}}
		    {{^noneSortEntry}}
			    {{#currentSortEntry.asc}}↑{{/currentSortEntry.asc}}
			    {{^currentSortEntry.asc}}↓{{/currentSortEntry.asc}}
		    {{/noneSortEntry}}
		    <span class="caret"></span>
		  </button>
		  <ul class="dropdown-menu" role="menu">
		  	{{#sortEntrys}}
		    <li>
		    	<a href="?st_{{name}}={{nextDir}}{{#filterExp}}&{{filterExp}}{{/filterExp}}">
		    	{{text}} 
		    	{{#selected}}
			    	{{#nextAsc}}↑{{/nextAsc}}
			    	{{^nextAsc}}↓{{/nextAsc}}
		    	{{/selected}}
		    	</a>
		    </li>
		    {{/sortEntrys}}
		  </ul>
		{{/sortInfo}}
		</div>
	</div>
	{{#otherParams}}
	<input type="hidden" name="{{key}}" value="{{value}}"/>
	{{/otherParams}}
</form>
<script type="text/javascript">
$(document).ready(function() {
   	var txtDynamicFilter=$("#so_dynamicFilter"),
   		selQueryField=$("#so_queryFields")
   		txtQueryValue=$("#so_queryValue");
   	selQueryField.on("change", function(evt){
		 var name=$(this).children('option:selected').val();
		 txtDynamicFilter.attr('name',name);
		 txtDynamicFilter.val(txtQueryValue.val());
	});
   	$('#so_go').on("click", function(evt){
   		var name=selQueryField.children('option:selected').val();
   		txtDynamicFilter.attr('name', name);
   		txtDynamicFilter.val(txtQueryValue.val());
   	});
   	selQueryField.trigger("change");
});
</script>
    </div>
    <div class="table-responsive">
	<table id="contentTable" class="table table-striped table-bordered table-hover">
		<thead><tr>
		<th>登录名</th><th>意见内容</th><th>类别</th><th>当前状态</th><th>创建时间</th>
		<th>管理</th>
		</tr></thead>
		<tbody>
		{{#comments.content}}		
			<tr>
				<td>{{loginName}}</td>
				<td class="contentCls">{{content}}</td>
				<td>{{type}}</td>
				<td class="enum-type" data-type="comment-status"  data-value="{{status}}"></td>
				<td> <script type="text/javascript">
									document.write($.format.date(
											"{{createTime}}",
											"yyyy-MM-dd HH:mm"))
								</script></td>
				<td>
					<a href="javascript:showConfigView('{{id}}')">编辑</a>
					&nbsp;
					<a href="{{ctx}}/comment/feedback?commentId={{id}}&appId={{appId}}">回复</a>
					&nbsp;
					<a href="javascript:void(0)" onclick="deleteItem('{{ctx}}/comment/delete/{{id}}?appId={{appId}}')">删除</a>
				</td>
			</tr>
		{{/comments.content}}
		</tbody>
	</table>
	</div>
	{{#page}}
	{{>/WEB-INF/pages/common/pagination.part.html}}
	{{/page}}
	{{>/WEB-INF/pages/common/layout_footer.part.html}}
	</div>
	{{>/WEB-INF/pages/comment/comment-modal.html}}
</body>
</html>

<script type="text/javascript">
    function deleteItem(url){
        bootbox.confirm("是否确认删除该记录?",
                function(op) {
                    if (op) {
                        window.location.href=url;
                    }
                });
    }
</script>

